package com.yaodian100.mall.activities;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.yaodian100.core.common.utils.ServerValue;
import com.yaodian100.crm.activities.service.MgmService;

public class EDMAction extends ActionSupport implements Preparable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private MgmService mgmService;
	private String couponId;// 礼券号
	private String loginId;
	private String basehref;
	private String contextpath;

	public String mgmemdform() {
		HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
		couponId = request.getParameter("mgmCouponid");
		loginId = mgmService.getMgmCouponInfo(couponId).getUserName();
		basehref = ServerValue.getFrontHostname();
		contextpath = ServerValue.getFrontContextPath();
		return "edmmgm";
	}

	@Override
	public void prepare() throws Exception {
		// TODO Auto-generated method stub

	}

	public String getCouponId() {
		return couponId;
	}

	public void setCouponId(String couponId) {
		this.couponId = couponId;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getBasehref() {
		return basehref;
	}

	public void setBasehref(String basehref) {
		this.basehref = basehref;
	}

	public String getContextpath() {
		return contextpath;
	}

	public void setContextpath(String contextpath) {
		this.contextpath = contextpath;
	}

}
